﻿using Emgu.CV;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace yysAuxiliary.测试
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        FaceDetectHelper detectHelper = new FaceDetectHelper();

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Mat m = detectHelper.BitmapToMat((Bitmap)pictureBox1.Image.Clone());
                detectHelper.FaceRecognize(m).facesRectangle.ForEach(p =>
                {
                    textBox1.AppendText(p.ToString());
                });


            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
